@use '@angular/material' as mat;

@mixin view-map-color($theme) {
  $config: mat.m2-get-color-config($theme);
  $foreground: map-get($config, foreground);
  $background: map-get($config, background);
  $primary: map-get($config, primary);
  $accent: map-get($config, accent);
  $warn: map-get($config, warn);

  .view-map {
    .sidebar {
      background-color: mat.m2-get-color-from-palette($background, card);
      @include mat.elevation(4, #000, 0.35);
    }
    .mat-expansion-panel-header:not(.mat-expanded) {
      background-color: mat.m2-get-color-from-palette($foreground, text, 0.1);
    }
    .tools {
      background-color: mat.m2-get-color-from-palette($background, card);
      @include mat.elevation(4, #000, 0.35);
    }
    .viewport {
      border-right: 1px solid rgb(97 97 97 / 8%);
      @include scrollbar(
        mat.m2-get-color-from-palette($foreground, divider, 0.2)
      );
      .list {
        @include mat.elevation(4, #000, 0.35);
        background-color: mat.m2-get-color-from-palette(
          $background,
          card,
          0.85
        );
        .media {
          img {
            box-shadow: 0 4px 10px 1px rgb(0 0 0 / 7%);
          }
        }
        .badge {
          li {
            color: mat.m2-get-color-from-palette($primary, default-contrast);
            background-color: mat.m2-get-color-from-palette($primary);
          }
        }
        &.selected {
          &:after,
          &:before {
            background: mat.m2-get-color-from-palette($primary);
          }
        }
      }
    }
  }
}
